<template>
  <div class="box" v-if="isShow">
    <div class="box_close" @click="handleClick">
      <i class="el-icon-close"></i>
    </div>
    <div class="box_title">
      <!-- <i class="el-icon-warning"></i> -->
      <slot name="title"></slot>
    </div>
    <slot name="content"></slot>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isShow: true
    }
  },
  methods: {
      handleClick(){
          this.isShow = false;
      }
  },
  props: []
}
</script>

<style lang="scss" scoped>
.box {
  background: #f39c12;
  margin: 5px;
  border-radius: 3px;
  color: #fff;
  padding: 10px 20px;
  line-height: 24px;
  position: relative;
  .box_close {
    position: absolute;
    right: 2px;
    top: 2px;
    font-size: 24px;
    cursor: pointer;
  }
  .box_title {
    font-size: 20px;
    padding-bottom: 5px;
    i {
      margin-right: 10px;
    }
  }
}
</style>